package interfaces

type Config interface {
	GetLogConf() LogConf
	GetBaseConf() BaseConf
	GetMasterMysqlConf() MySQLConf
	GetSlaverMysqlConf() MySQLConf
	GetMasterRedisConf() RedisConf
	GetSlaverRedisConf() RedisConf
}

// Addr 监听地址和端口
type BaseConf struct {
	Host      string `yaml:"LISTEN_HOST"`
	Port      string `yaml:"LISTEN_PORT"`
	SecretKey string `yaml:"SECRET_KEY"`
}

// MySQL 配置
type MySQLConf struct {
	User string `yaml:"MYSQL_USER"`
	Pass string `yaml:"MYSQL_PASSWORD"`
	Host string `yaml:"MYSQL_HOST"`
	Port string `yaml:"MYSQL_PORT"`
	Name string `yaml:"MYSQL_DATABASE"`
}

// Redis 配置
type RedisConf struct {
	Host string `yaml:"REDIS_HOST"`
	Port string `yaml:"REDIS_PORT"`
	Pass string `yaml:"REDIS_PASS"`
}

type LogConf struct {
	LogPath       string
	LogFileFormat string
	LogLevel      string
}
